<?php defined('InNcPHP') or exit('Access Invalid!');?>

<div class="page">
    <table class="table tb-type2 order">
        <tbody>
        <tr class="space">
            <th colspan="15"><?php echo $lang['order_index_status'];?></th>
        </tr>
        <tr>
            <td colspan="2">
                <ul>
                    <li><strong><?php echo $lang['order_index_order_sn'];?>:</strong><?php echo $output['order']['order_sn'];?></li>
                    <li><strong><?php echo $lang['order_index_status'];?>:</strong><?php echo $output['status'][$output['order']['order_status']];?></li>
                    <li><strong><?php echo $lang['order_index_money'];?>:</strong><span class="red_common"><?php echo $lang['currency'].$output['order']['need_pay'];?> </span></li>
                    <li><strong>核销码:</strong><?php echo $output['order']['ticket_code']?substr($output['order']['ticket_code'],0,10).str_repeat('x',6) : '';;?> </li>
                </ul>
            </td>
        </tr>
        <tr class="space">
            <th colspan="2"><?php echo $lang['order_index_detail'];?></th>
        </tr>
        <tr>
            <th><?php echo $lang['order_index_content'];?></th>
        </tr>
        <tr>
            <td>
                <ul>
                    <li><strong><?php echo $lang['order_index_nickname'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['nickname'];?></li>
                    <li><strong><?php echo $lang['order_index_merchant'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['mc_shop_name'];?></li>
                    <li><strong><?php echo $lang['order_index_addtime'];?><?php echo $lang['nc_colon'];?></strong><?php echo date('Y-m-d H:i:s',$output['order']['add_time']);?></li>
                    <li><strong><?php echo $lang['order_index_allowtime'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['allow_date']?$output['order']['allow_date']:$lang['order_index_notlimit'];?></li>
                    <?php if(intval($output['order']['pay_time'])){?>
                        <li><strong><?php echo $lang['order_index_paytime'];?><?php echo $lang['nc_colon'];?></strong><?php echo date('Y-m-d H:i:s',$output['order']['pay_time']);?></li>
                    <?php }?>
                    <?php if(intval($output['order']['used_time'])){?>
                        <li><strong><?php echo $lang['order_index_usetime'];?><?php echo $lang['nc_colon'];?></strong><?php echo date('Y-m-d H:i:s',$output['order']['used_time']);?></li>
                    <?php }?>
                    <?php if($output['order']['order_type']==1){ ?>
                        <?php foreach ($output['order']['sku'] as $sku): ?>
                            <li><strong>入住时间</strong><?php echo $sku['startdate'];?></li>
                            <li><strong>离店时间</strong><?php echo $sku['enddate'];?></li>
                            <li><strong>总晚数</strong><?php echo $sku['numdate'];?>晚</li>
                        <?php endforeach; ?>
                    <?php }elseif($output['order']['order_type']==4) {?>
                        <?php foreach ($output['order']['sku'] as $sku): ?>
                        <li><strong>出发时间<?php echo $lang['nc_colon'];?></strong><?php echo $sku['startdate'];?></li>
                        <?php endforeach; ?>
                    <?php } ?>
                </ul>
            </td>
        </tr>
        <tr>
            <th><?php echo $lang['order_index_member_info'];?></th>
        </tr>
        <tr>
            <td>
                <ul>
                    <li><strong><?php echo $lang['order_index_member_name'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['member_name'];?></li>
                    <li><strong><?php echo $lang['order_index_member_phone'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['member_phone'];?></li>
                    <?php if($output['order']['order_type']==2) {?>
                    <li><strong><?php echo $lang['order_index_member_card'];?><?php echo $lang['nc_colon'];?></strong><?php echo $output['order']['member_idcard'];?></li>
                    <?php } ?>
                </ul>
            </td>
        </tr>
        <tr>
            <th><?php echo $lang['order_index_ticket_info'];?></th>
        </tr>
        <tr>
            <td><table class="table tb-type2 goods ">
                    <tbody>
                    <tr>
                        <th><?php echo $lang['order_index_ticket_info'];?></th>
                        <th class="align-center"><?php echo $lang['order_index_ticket_type'];?></th>
                        <th class="align-center"><?php echo $lang['order_index_ticket_num'];?></th>
                        <th class="align-center"><?php echo $lang['order_index_ticket_price']; ?></th>
                    </tr>
                    <?php if($output['order']['order_type']==1){ ?>
                        <!-- 酒店 -->
                    <?php foreach ($output['order']['sku'] as $sku): ?>
                     <tr>
                        <td><?php echo $output['order']['ticket_title']; ?></td>
                        <td class="align-center"><?php echo $output['order']['spec_name'];?></td>
                        <td class="align-center"><?php echo $sku['oh_num'];?></td>
                        <td class="align-center"><?php echo $lang['currency'].$sku['unit_price'];?></td>
                    </tr>
                    <?php endforeach; ?>
                    <?php }elseif($output['order']['order_type']==2){?>
                        <!-- 门票 -->
                        <?php foreach ($output['order']['sku'] as $sku): ?>
                            <tr>
                                <td><?php echo $output['order']['ticket_title']; ?></td>
                                <td class="align-center"><?php echo $sku['type_name'];?></td>
                                <td class="align-center"><?php echo $sku['ot_num'];?></td>
                                <td class="align-center"><?php echo $lang['currency'].$sku['ot_price'];?></td>
                            </tr>
                        <?php endforeach; ?>
                    <?php }else{ ?>
                        <?php foreach ($output['order']['sku'] as $sku): ?>
                        <tr>
                            <td><?php echo $output['order']['ticket_title']; ?></td>
                            <td class="align-center"><?php echo $sku['type_name'];?></td>
                            <td class="align-center"><?php echo $sku['og_num'];?></td>
                            <td class="align-center"><?php echo $lang['og_num'].$sku['og_price'];?></td>
                        </tr>
                            <?php endforeach; ?>
                    <?php } ?>
                    </tbody>
                </table>
            </td>
        </tr>
        </tbody>
        <tfoot>
        <tr class="tfoot">
            <td><a href="JavaScript:void(0);" class="btn" onclick="history.go(-1)"><span><?php echo $lang['nc_back'];?></span></a></td>
        </tr>
        </tfoot>
    </table>
</div>
